FROM quay.io/adder99/ubi

RUN curl -#O https://gitee.com/suzhen99/redhat/raw/master/rhcsa/Entrypoint.sh && \
  chmod +x /Entrypoint.sh && \
  sed -i \
    -e '/gpgcheck/s+1+0+' \
    -e 's+https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/baseos/os+https://mirrors.cloud.tencent.com/centos-stream/9-stream/BaseOS/x86_64/os+' \
    -e 's+https://cdn-ubi.redhat.com/content/public/ubi/dist/ubi9/9/$basearch/appstream/os+https://mirrors.cloud.tencent.com/centos-stream/9-stream/AppStream/x86_64/os+' \
    /etc/yum.repos.d/ubi.repo && \
  yum config-manager --disable ubi-9-codeready-builder && \
  yum -y install enscript ghostscript \
    https://mirrors.huaweicloud.com/epel/9/Everything/x86_64/Packages/i/inotify-tools-3.22.1.0-1.el9.x86_64.rpm && \
  mkdir /dir1 /dir2

ENTRYPOINT ["/Entrypoint.sh"]